<include file="__THEME__/header2" />
<link rel="stylesheet" type="text/css" href="../Public/guide.css" />

<script>
    $(function(){
    	$(".change").toggle(
			function(){
				$(this).css("background-color","#FF2929");
				$(this).html("已关注");
				$(this).parent().find("input").attr("checked",true);
			},
			function(){
				$(this).css("background-color","#009833");
				$(this).html("关注");   
				$(this).parent().find("input").attr("checked",false);			
			}    		
    	);
    });
    
</script>

	<div class="page-wrap">
		<form action="__URL__/doguide" method="post" name="guide">
		<div class="guide" id="step1">
			<div class="step"></div>
			<div class="content">
				<h2>
					欢迎来到{$site_opts.site_name}，第一步请选择您感兴趣的病友社区。<br>
					如果没有，您可以亲自创建哦。
				</h2>
				<div class="showbox">
					<volist name="groupList" id="group">
					<div class="item">
						
						<a href="{:U('group://Group/index',array('gid'=>$group['id']))}" target="_blank">
							<img src="__ROOT__/thumb.php?w=90&h=90&url={$group['logo']|get_photos_url}"/>
						</a>
						<!-- <img src="{$mid|getUserFace='middle'}?<?php echo time();?>" width="90" height="90"/> -->
						<div class="info">
							<span>{$group['name']}</span>
							<label>{$group['membercount']}人关注</label>
							<a class="change" href="#">关注</a>
							<input type="checkbox" name="groups[]" value="{$group['id']}" style="display:none;"/>
						</div>
					</div>
					</volist>
				</div>
				<div class="clear"></div>
				<div class="control">
					<a class="more" href="#">更多社区&nbsp;&rsaquo;&rsaquo;</a>
					<div class="clear"></div>
					<a class="next" href="#" onclick="showstep('step2');return false;">下一步</a>
				</div>
			</div>
		</div>
		<div class="guide" id="step2">
			<div class="step"></div>
			<div class="content">
				<h2>
					快好啦！在您感兴趣的社区选择关注的病友吧！
				</h2>
				<div class="showbox">
					<volist name="userList" id="user">
					<div class="item">
						<img src="{$user['id']|getUserFace='middle'}?<?php echo time();?>" width="90" height="90"/>
						<div class="info">
							<span>{$user['name']}</span>
							<label>{:get_user_friend_num($user['id'])}人关注</label>
							<a class="change" href="#" >关注</a>
							<input type="checkbox" name="users[]" value="{$user['id']}" style="display:none ;"/>
						</div>
					</div>
					</volist>
				</div>
				<div class="clear"></div>
				<div class="control">
					<a class="pre" href="#" onclick="showstep('step1')">&lsaquo;&lsaquo;&nbsp;返回</a>
					<a class="more" href="#">更多病友&nbsp;&rsaquo;&rsaquo;</a>
					<div class="clear"></div>
					<a class="next" href="#" onclick="showstep('step3')";>下一步</a>
				</div>
			</div>
		</div>		
		<div class="guide" id="step3">
			<div class="step"></div>
			<div class="content">
				<h2>
					最后，丰富您的个人资料，让您更精准地获得所需服务。
				</h2>
				<div class="showbox">
			    <form id="member_reg_form" action="__URL__/doReg" method="post" class="form-horizontal">
			    	<input type="hidden" name="code" value="{$code}">
			    	<input type="hidden" name="sex" value="1">
			        <div class="form-item">
			            <label class="form-label">昵称：</label>
			            <div class="form-field">
							{$my_name}&nbsp;
			            </div>
			        </div>			        
			        <div class="form-item">
			            <label class="form-label">疾病名称：</label>
			            <div class="form-field">
			                <input type="text" name="disease" class="ipt-text"><br>
			            </div>
			        </div>
			        <div class="form-item">
			            <label class="form-label">看诊医院：</label>
			            <div class="form-field">
			                <input type="text" name="hospital" class="ipt-text"><br/>
			            </div>
			        </div>
			
			        <div class="form-item">
			            <label class="form-label">主治医生：</label>
			            <div class="form-field">
			                <input type="text" name="doctor" class="ipt-text">
			            </div>
			        </div>
			        
			        <div class="form-item">
			            <label class="form-label">初次发病时间：</label>
			            <div class="form-field">
			                <input type="text" name="firsttime" class="ipt-text">
			            </div>
			        </div>
			        <div class="clear" style="height: 20px;"></div>
			        
			    </form>						
				</div>
				<div class="clear"></div>
				<div class="control">
					<a class="pre" href="#" onclick="showstep('step2')">&lsaquo;&lsaquo;&nbsp;返回</a>
					<div class="clear"></div>
					<a class="next" href="#" onclick="document.guide.submit()">完成</a>
				</div>
			</div>
		</div>			
		</form
	</div>   
	
	<script type="text/javascript">
		$(function(){
			$(".guide").hide();
			$("#step1").show();
		});
	
		function showstep(step){
			$(".guide").hide();
			$("#"+step).animate({
				height:'show',
				opacity:'show'
			},1500);
		}
		
	</script>

<include file="__THEME__/footer" />
